<div class="nav-tabs-custom">
    <ul class="nav nav-tabs">
        <li><a href="{:Url('index')}">图片位置管理</a></li>
		<li><a href="{:Url('picList', array('picid'=>$pic['id']))}">图片列表</a></li>
		<li class="active"><a href="#">添加图片</a></li>
	</ul>
	
	<form class="form-horizontal js-ajax-form" method="post" action="{:Url('picAdd_post')}">
		<div class="box-body mt10">
			<div class="form-group">
				<label class="col-sm-2 control-label">图片名称 <span>*</span></label>
				<div class="col-sm-9">
					<input type="text" name="name" class="form-control" placeholder="位置名称" />
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-2 control-label">图片简介</label>
				<div class="col-sm-9">
					<input type="text" name="intro" class="form-control" placeholder="图片简介" />
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-2 control-label">图片描述</label>
				<div class="col-sm-9">
                    <textarea name="description" rows="3" class="form-control" placeholder="图片描述"></textarea>
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-2 control-label">图片链接</label>
				<div class="col-sm-9">
					<input type="text" name="linkurl" class="form-control" placeholder="图片链接" />
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-2 control-label">图片 <span>*</span></label>
				<div class="col-sm-9">
                    <a href="javascript:;" class="upload_thumb" onclick="flashupload('图片上传','imgurl', thumb_images, '1,baseImage'); return false;">
                        <img src="__IMG__/icon/default-thumbnail.png" id="imgurl_preview" style="max-width:100px; max-height:100px;" />
                        <input type="hidden" name="imgurl" id="imgurl" />
                    </a>
                    <div class="mt5">
                        <button class="btn btn-xs btn-danger" onclick="$('#imgurl_preview').attr('src','__IMG__/icon/default-thumbnail.png');$('#imgurl').val('');return false;">取消图片</button>
                    </div>
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-2 control-label">状态</label>
				<div class="col-sm-2">
					<select name="status" class="form-control select2">
						<option value='0'>显示</option>
						<option value='1'>隐藏</option>
					</select>
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-2 control-label">排序</label>
				<div class="col-sm-1">
					<input type="number" name="sort" min="0" class="form-control" placeholder="排序，默认0" value="0" size="16" />
				</div>
			</div>
		</div>
		<div class="box-footer">
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
                    <input type="hidden" name="picid" value="{$pic.id}" />
					<button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
					<a href="javascript:" onclick="self.location=document.referrer;" class="btn btn-default">返回</a>
				</div>
			</div>
		</div>
    </form>

</div>

